import { IsNotEmpty, IsOptional } from 'class-validator'
import { CreateRoleDTO } from './create-role.dto'
import { PartialType } from '@nestjs/mapped-types'
import { Exclude } from 'class-transformer'

export class UpdateRoleDTO extends PartialType(CreateRoleDTO) {
  @IsNotEmpty({ message: '参数 $property 不可为空' })
  id: string

  @Exclude()
  code: string

  @Exclude()
  createBy: string
}
